﻿using Engine;
using Engine.Graphics;
using Game;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Game
{
    internal class Nkdemo : CubeBlock
    {
        public const int Index = 700;
        public override void DrawBlock(PrimitivesRenderer3D primitivesRenderer,
            int value, Color color, float size, ref Matrix matrix,
            DrawBlockEnvironmentData environmentData)
        {
            BlocksManager.DrawCubeBlock(primitivesRenderer, value, size: new Vector3(size),
   ref matrix, color, topColor: Color.White, environmentData);
        }
        public override void GenerateTerrainVertices(BlockGeometryGenerator generator,
            TerrainGeometry geometry,
            int value, int x, int y, int z)
        {
        }
        public override void Initialize()
        {
          
            InHandScale = (float)0.35;
            FirstPersonScale = (float)0.4;
            FirstPersonOffset = new Vector3((float)0.5, (float)-0.5, (float)-0.5);
            base.Initialize();
        }
        public override int GetFaceTextureSlot(int face, int value)
        {
            switch (face)
            {
                case 0: return 20;
                case 1: return 20;
                case 2: return 20;
                case 3: return 20;
                case 4: return 21;
                case 5: return 21;
                default:
                    {
                        Log.Error(new ArgumentOutOfRangeException().ToString());
                        return 0;
                    }
            }
        }
    }

}
